<!--  -->
<template>
  <div class="base-container">
    <el-row gutter="10">
      <el-col :span="4">
        <TreeMenu ref="projectFileTree" @handleNodeClick="handleNodeClick" @selTreeList = "handleNodeClick"/>
      </el-col>
      <el-col :span="20">
        <ProjectDeviceTableView ref="ProjectDeviceTableView"/>
      </el-col>
    </el-row>

  </div>
</template>

<script>
let component;
import TreeMenu from '../../components/ProjectFileTree.vue';
import ProjectDeviceTableView from './components/ProjectDeviceTableView.vue';

export default {
  data() {
    return {
      projectId: 1,
      treeList: [],
    };
  },

  components: {TreeMenu, ProjectDeviceTableView},


  methods: {
    async handleNodeClick(data) {
      component.$refs.ProjectDeviceTableView.setSelProject(data.projectId);
    },
  },
  mounted() {
    component = this;
    component.$refs.projectFileTree.selTreeList(true)
  }
}

</script>
<style lang='scss' scoped></style>